package org.example.java.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.example.java.mapper.UserMapper;
import org.example.java.model.User;
import org.example.java.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service
@Transactional
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public boolean createUser(User user) {
        return this.save(user);
    }

    @Override
    public boolean updateUser(User user) {
        return this.updateById(user);
    }
}
